using PPIProxy;
using PPIDesktopClient.Entities;
using PPIDesktopClient.General;
using System;
using System.Data;
using System.Data.SqlClient;

namespace PPIDesktopClient.Logic
{
	public static class LUtility_QueryPolygon_Point
	{
		#region Query
        public static DataTable SelectAllByQuery(Int32 Utility_QueryPolygonId)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            return WUtility_QueryPolygon_Point.SelectAllByQuery(Utility_QueryPolygonId,_Reader.GetConnectionString()).Tables[0];
        }
        #region summary
		/// <summary>
		/// Date: 05/12/2008
		/// Time: 14:15:28
		/// Generated by: VMCoder
		/// Generated using VirtualGenerator
		/// </summary>
		#endregion summary
		public static DataTable SelectAll()
		{
            ConfigReader _Reader = ConfigReader.GetInstance();
			return WUtility_QueryPolygon_Point.SelectAll(_Reader.GetConnectionString()).Tables[0];
		}
		#endregion Query

		#region CRUD
		#region summary
		/// <summary>
		/// Date: 05/12/2008
		/// Time: 14:15:28
		/// Generated by: VMCoder
		/// Generated using VirtualGenerator
		/// </summary>
		#endregion summary
        public static Int32 Insert(EUtility_QueryPolygon_Point polygonPoint)
		{
            ConfigReader _Reader = ConfigReader.GetInstance();
			return WUtility_QueryPolygon_Point.Insert(polygonPoint.Utility_QueryPolygon.Utility_QueryPolygonId, polygonPoint.Latitude, polygonPoint.Longitude,_Reader.GetConnectionString());
		}
		#region summary
		/// <summary>
		/// Date: 05/12/2008
		/// Time: 14:15:28
		/// Generated by: VMCoder
		/// Generated using VirtualGenerator
		/// </summary>
		#endregion summary
		public static void Delete(Int32 utility_QueryPolygon_PointId)
		{
            ConfigReader _Reader = ConfigReader.GetInstance();
			WUtility_QueryPolygon_Point.Delete(utility_QueryPolygon_PointId,_Reader.GetConnectionString());
		}
        #region summary
        /// <summary>
        /// Date: 05/12/2008
        /// Time: 14:15:28
        /// Generated by: VMCoder
        /// Generated using VirtualGenerator
        /// </summary>
        #endregion summary
        public static void DeleteByQuery(Int32 utility_QueryPolygonFk)
        {
            ConfigReader _Reader = ConfigReader.GetInstance();
            WUtility_QueryPolygon_Point.DeleteByQuery(utility_QueryPolygonFk,_Reader.GetConnectionString());
        }
        #endregion CRUD
	}
}

